<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8 />
<title>{$title}</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- this link will be substituted with the right path : href="THEMES/acid/style.css" -->
{function="doCSS();"}
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/960_24_col.css" />
<link rel="stylesheet" href="style.css" />
{function="doJavascript();"}
</head>
<body>
	<!-- this img  will be substituted with the right path : src="THEMES/acid/images.gif" -->			
	<div id="toolBar">
		<div class="container_24">
			<div class="grid_24" style="vertical-align:center;color:#ffffff; margin-top:10px;border:#000000 1px solid">{$title}</div>
		</div>
	</div>
	<div class="clear"></div>
	<div id="searchBar">
		<div class="container_24">
			<div class="grid_3" style="border:#000000 1px solid">{$title}</div>
			<div class="grid_20 push_1 omega" style="border:#000000 1px solid">{$title}</div>
			<div class="clear"></div>
			<div class="grid_24 omega" style="border:#000000 1px solid">w</div>
		</div>
	</div>
    <div id="topNav">
		<div class="container_24">
			<div class="grid_24" style="vertical-align:center; margin-top:10px;border:#000000 1px solid">{$title}</div>
		</div>
	</div>
	<!-- content -->
	
	<div id="container_24 content">
	<div class="grid_24">
		<h1>{$title}</h1>
<form method="post">
		<p>
			My Editor:<br />
			<textarea id="editor1" name="editor1">&lt;p&gt;Initial value.&lt;/p&gt;</textarea>
			<script type="text/javascript">
				CKEDITOR.replace( 'editor1' );
			</script>
		</p>
		<p>
			<input type="submit" />
		</p>
	</form>
	<p>This is a very simple site to demonstrate a functional multi-user website using PHP sessions and MySQL for authentication.</p>
	<br>
	<h2>Files used in the PHP SimpleAuth package</h1>
	<p>The site consists of the following front-end scripts:</p>
	<ul>
	<li><a href="join.php">join.php</a> - a script to allow users to create a new user account</li>
	<li><a href="login.php">login.php</a> - a script to allow users to login to the site</li>
	<li><a href="members.php">members.php</a> - a script which loads when a user successfully logs in</li>
	</ul>
		
	<p>The following backend scripts are used:</p>
	<ul>
	<li>config.php - contains configuration info such as mysql login/pass/host/db details and other items used through the site</li>
	<li>functions.php - contains all functions used in the simpleauth package</li>
	<li>users.sql - contains the MySQL to build the &quot;users&quot; table</li>
	</ul>
	<br>
	<h2>Support</h2>
	There is now a forum for support related questions for <a href="http://simpleauth.munk.me.uk/">SimpleAuth</a> located here:<br>
	<a href="http://forums.munk.me.uk/forumdisplay.php?fid=1">SimpleAuth Forum</a><br><br>
	
	Have fun!<br>
	Jez	
	
		<h2>Variable example</h2>
		<div class="layout">
            
			<h3>Variable example</h3>
			{* all code between noparse tags is not compiled *}
			<tt>variable {noparse}{$variable}{/noparse} = <b>{$variable}</b></tt>

			<br/><br/>
			<h3>Variable assignment</h3>
			<tt>assignment {$number=10} and print {$number}</tt>

			<br/><br/>
			<h3>Operation with strings</h3>
	
			<tt>
				{$variable . $number}<br/>
				{$number + 20}
			</tt>

			<br/><br/>
			<h3>Variable Modifiers</h3>
			<tt>
				{$variable|substr:0,7}<br/>
				a modifier on string: {"hello world"|strtoupper}
			</tt>

			<br/><br/>
			<h3>Global variables</h3>
			<tt>The variable is declared as global into the PHP {$GLOBALS.global_variable}</tt>
			<br/><br/>
			
			<h3>Show all declared variables</h3>
			To show all declared variable use {noparse}{$template_info}{/noparse}.<br/><br/>
			<tt>
				{$template_info}
			</tt>
			<br/><br/>

		</div>
					
		<h2>Constants</h2>
		<div class="layout">
			<h3>Constant</h3>
			<tt>Constant: {#true#}</tt>
			
			<br/><br/>
			<h3>Modier on constant as follow</h3>
			<tt>Negation of false is true: {PHP_VERSION|round}</tt>
		</div>

		<h2>Loop example</h2>
		<div class="layout">
			<h3>Simple loop example</h3>
			<tt>
			<ul>
			{loop="week"}
				<li>{$key} = {$value}</li>
			{/loop}
			</ul>
			</tt>

			<br/><br/>
			
			<h3>Loop example with associative array</h3>
			<tt>
			<ul>
				<li>ID _ Name _ Color</li>
				{loop="user"}
					<li class="color{$counter%2+1}">{$key}) - {$value.name|strtoupper} - {$value.color}</li>
				{/loop}
			</ul>
			</tt>
			
			<br/><br/>
			
			<h3>Loop an empty array</h3>
			<tt>
			<ul>
				{loop="empty_array"}
					<li class="color{$counter%2+1}">{$key}) - {$value.name} - {$value.color}</li>
				{else}
					<b>The array is empty</b>
				{/loop}
			</ul>
			</tt>

		</div>
		
		<h2>If Example</h2>
		<div class="layout">
		
			<h3>simple if example</h3>
			<tt>
			{if="$number==10"}OK!
			{else}NO!{/if}
			</tt>
			
			<br/><br/>
			
			<h3>example of if, elseif, else example</h3>
			<tt>
			{if="substr($variable,0,1)=='A'"}First character is A
			{elseif="substr($variable,0,1)=='B'"}First character is B
			{else}First character of variable is not A neither B
			{/if}
			</tt>
			<br/><br/>
			
			<h3>use of ? : operator (number==10?'OK!':'no')</h3>
			You can also use the ? operator instead of if
			<tt>{$number==10? 'OK!' : 'no'}</tt>
			
		</div>
		
		<h2>Include Example</h2>
		<div class="layout">
			<h3>Example of include file</h3>
			<tt>{include="test"}</tt>
		</div>
		
		<h2>Functions</h2>
		<div class="layout">
			<h3>Example of function: ucfirst(strtolower($title))</h3>
			<tt>{function="ucfirst(strtolower($title))"}</tt>
		</div>
	</div>
	</div>
	<div class="clear"></div>
	<div id="footer">
	<div class="container_24">
		{$copyright}
	</div>
	</div>
	</body>
</html>
